package 第十二章_反射与内省.第十二章_反射与内省_AOP框架;

public class LogAdvice implements Advice{
    float starttime=startadvice();
    @Override
    public float startadvice() {
        System.out.println("start time: "+System.currentTimeMillis());
        float starttime=System.currentTimeMillis();
        return starttime;
    }

    @Override
    public void endadvice() {
        System.out.println("end time: "+System.currentTimeMillis());
        float endtime=System.currentTimeMillis();
        System.out.println("cost time: "+(starttime-endtime));
    }
}
